package per.zhang.serverPrevioder.entity;


import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * <p>
 * 
 * </p>
 *
 * @author Zhang
 * @since 2021-01-25
 */
@Data
@ApiModel(value="appointment")
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "appointment")
public class Appointment implements Serializable  {



    /**
     * 预约id
     */
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "appointment_id")
    @ApiModelProperty(value = "预约id",name = "appointmentId",dataType = "Integer")
    private Integer appointmentId;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    @ApiModelProperty(value = "用户id",name = "userId",dataType = "String")
    private String userId;

    /**
     * 预约人名字
     */
    @Column(name = "user_name")
    @ApiModelProperty(value = "预约人名字",name = "userName",dataType = "String")
    private String userName;

    /**
     * 用户联系方式
     */
    @Column(name = "callphone")
    @ApiModelProperty(value = "用户联系方式",name = "callphone",dataType = "String")
    private String callphone;

    /**
     * 疫苗id
     */
    @Column(name = "vaccine_id")
    @ApiModelProperty(value = "疫苗id",name = "vaccineId",dataType = "Integer")
    private Integer vaccineId;

    /**
     * 创建时间
     */
    @Column(name = "creat_time")
    @DateTimeFormat(pattern = "YYYY-MM-DD hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间",name = "creatTime",dataType = "LocalDateTime")
    private Date creatTime;

    /**
     * 预约时间
     */
    @Column(name = "appointment_time")
    @DateTimeFormat(pattern = "YYYY-MM-DD hh:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "预约时间",name = "appointmentTime",dataType = "LocalDateTime")
    private Date appointmentTime;

    /**
     * 预约状态，0表示已预约，1表示已接种，2表示已取消
     */
    @Column(name = "state")
    @ApiModelProperty(value = "预约状态，0表示已预约，1表示已接种，2表示已取消",name = "state",dataType = "String")
    private String state;


}


